<!doctype html>

<html lang="en">
<head>
    <title></title>
</head>
<body>

<?php 
			if($_SESSION['log'] == 1){
				include_once("header_connecter.html");
			}else{
				include_once("header_deconnecter.html");
			} 
		?>
    		<br/>
		<br/>
		<br/>
		<br/> 
			<center>
                <table id="table2" name="table2">
				<form action="modifier_bien.php?id=<?php echo $_GET['id'] ?>" method="post">
                                    
                                        <tr>
						<td>Photo</td> 
						<td> <img src="<?php echo $Photo["photo"]; ?>" /> </td>
                                                <td> <input type="file" value="" id="img" name="img" title="Veuillez saisir votre image" required /> </td>
					</tr>
					<tr>
						<td>Pays</td> 
						<td> <select name="pays" id="pays">
							<?php while($data2= mysqli_fetch_array($req_pays))
							{
                                                            echo " <option value='".$data2['id']."' ";
                                                            if( $data2['id'] == $query['id_pays'])
                                                                echo ' selected = "selected" ';
                                                                
                                                            echo '>';
                                                            echo $data2['pays'];
                                                            echo "</option>";
							}
							?>
						    </select> </td>
					</tr>
					<tr>
						<td>Adresse</td> 
						<td> <input type="text" name="adresse" id="adresse" value="<?php echo $query["adresse"]; ?>" /> </td>
					</tr>
					<tr>
						<td>Ville</td> 
						<td>
                                                    <select name="ville" id="ville">
							<?php while( $d = mysqli_fetch_array($req_ville)){
                                                            echo " <option value='".$d['id']."' ";
                                                            if( $d['id'] == $query['id_ville'])
                                                                echo ' selected = "selected" ';
                                                            
                                                            
                                                            echo '>';
                                                            echo $d['ville'];
                                                            echo "</option>";
                                                         }
							?>
						    </select> </td>
					</tr>
					<tr>
						<td>Code postal</td> 
						<td> <input type="text" name="codepostal" id="codepostal" value="<?php echo $query["codepostal"]; ?>" /> </td>
					</tr>
					<tr>
						<td>Surface</td> 
						<td> <input type="text" name="surface" id="surface" value="<?php echo $query["surface"]; ?>" /> </td>
					</tr>
                                        <tr>
                                            <td>Tarif par jour</td>
                                            <td> <input type="text" name="tarif_jour" id="tarif_jour" value="<?php echo $query["tarif_jour"]; ?>" /> </td>
                                        </tr>
                                        <tr>
                                            <td>Tarif par semaine</td>
                                            <td> <input type="text" name="tarif_semaine" id="tarif_semaine" value="<?php echo $query["tarif_semaine"]; ?>" /> </td>
                                        </tr>
                                        <tr>
                                            <td>Description</td>
                                            <td> <input type="text" name="description" id="description" value="<?php echo $query["description"]; ?>" /> </td>
                                        </tr>
					<tr>
						<td colspan="2" align="center"><input type="submit" value="Ok" id="OK" name="OK" /> </td>
					</tr>
				</form>
		</table>
		</center>
</body>
</html>
